<html>
<body>
<h3>用户新增</h3>
<form action="${rc.contextPath}/screener/doInsert" method="post"
	name="insertForm">
<table>
	<tr>
		<td>用户名:</td>
		<td><input type="text" name="userId" id="userId" /></td>
	</tr>
	<tr>
		<td>姓名:</td>
		<td><input type="text" name="userName" id="userName" /></td>
	</tr>
	<tr>
		<td>密码:</td>
		<td><input type="password" name="password" id="password" /></td>
	</tr>
	<tr>
		<td colspan="2"><input type="button" value="新增"
			onClick="insert();return false;" /></td>
	</tr>
</table>
</form>
<script type="text/javascript">
	function insert() {
		var userId = document.getElementById("userId").value;
		var userName = document.getElementById("userName").value;
		var password = document.getElementById("password").value;

		if (userId == '') {
			alert("用户名不能为空");
			return;
		}
		if (userName == '') {
			alert("姓名不能为空");
			return;
		}
		if (password == '') {
			alert("密码不能为空");
			return;
		}
		document.insertForm.submit();
	}
</script>
</body>
</html>
